home *** CD-ROM | disk | FTP | other *** search
- Path: tank.news.pipex.net!pipex!iol!not-for-mail
- From: goyra@iol.ie (David Byrden)
- Newsgroups: comp.lang.c++
- Subject: Re: Explicit copy constructor calls illegal?
- Date: 16 Mar 1996 11:38:15 GMT
- Organization: Ireland On-Line
- Distribution: world
- Message-ID: <4ie977$h9j@nuacht.iol.ie>
- References: <4i9tp8$fgt@reznor.larc.nasa.gov> <00001a81+0000ad4e@msn.com> <4ic1f4$a3p@reznor.larc.nasa.gov>
- NNTP-Posting-Host: joyce.iol.ie
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- lance@jitter.larc.nasa.gov wrote:
- :
- : By the way, an explicit call to the CC or any constructor IS possible, and
- : is done routinely, just not the way I was trying to do it :) I have used
- : the copy constructor in lieu of an overloaded operator=, like
- : MyClass Myclass1;
- : int Myclass1.IMyClass(/*member values, etc. */);
- : MyClass Myclass2(Myclass1); // Kind of an explicit CC call.
- :
-
- Well, it's explicit all right, but it is firmly tied to the creation
- of the object "Myclass2" so it's not possible to use it to, say,
- re-initialise an existing object.
-
- David
-
-